﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
//using System.Xml.Linq;
using System.Collections.Generic;

using YouHP.BLL;
using YouHP.Model;
using YouHP.Utility;

namespace web.admin
{
    public partial class RecommendedUserList : System.Web.UI.Page
    {
        RecommendUserBLL recommendUserBLL = RecommendUserBLL.Instance;
        protected void Page_Load(object sender, EventArgs e)
        {
            DeleteRecommendUserByID();
            bind();
        }
        protected void search_Click(object sender, EventArgs e)
        {

        }

        private void bind()
        {
            List<RecommendUserInfo> list = null;

            try
            {
                list = recommendUserBLL.RecommendUserGetList();

            }
            catch (Exception ex)
            {
                throw ex;
            }

            this.recommendedUserList.DataSource = list;
            this.recommendedUserList.DataBind();
        }

        private void DeleteRecommendUserByID()
        {
            int id = RequestTools.GetQueryInt("id", -1);
            int[] itemsId={1};
            itemsId[0] = id;
            if (id != -1)
            {
                recommendUserBLL.RecommendUserDel(itemsId);
            }
        }

 
    }
}
